Skip to content

SIP2-309: Fix doPinCheck failing when FOLIO returns 200 without Content-Type header - #255

Merged
zakletskyi-epam merged 4 commits into
masterfrom
SIP2-309
Jun 30, 2026
Merged

SIP2-309: Fix doPinCheck failing when FOLIO returns 200 without Content-Type header#255
zakletskyi-epam merged 4 commits into
masterfrom
SIP2-309

Conversation

@zakletskyi-epam

@zakletskyi-epam zakletskyi-epam commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Purpose

After the Vert.x 5 migration, doPinCheck incorrectly inherited a Content-Type response header check via the shared getHttpRequestExpectations helper. The /patron-pin/verify endpoint returns 200 OK without a Content-Type header, causing SIP2 patron PIN verification to fail.

Approach

Restored the pre-migration behavior of doPinCheck — status-only check (SC_SUCCESS) without Content-Type validation, since the response body is not used. Updated the WireMock stub to reflect real FOLIO behavior (200 without Content-Type). Added two tests: a unit test reproducing the bug with a mocked 200 response without Content-Type, and a real embedded HTTP server test confirming end-to-end correctness.

Changes Checklist

  • API Changes: Document any API paths, methods, request or response bodies changed, added, or removed.
  • Database Schema Changes: Indicate any database schema changes and their impact. Confirm that migration scripts were created.
  • Interface Version Changes: Indicate any changes to interface versions.
  • Interface Dependencies: Document added or removed dependencies.
  • Permissions: Document any changes to permissions.
  • Logging: Confirm that logging is appropriately handled.
  • Unit Testing: Confirm that changed classes were covered by unit tests.
  • Integration Testing: Confirm that changed logic was covered by integration tests.
  • Manual Testing: Confirm that changes were tested on local or dev environment.
  • NEWS: Confirm that the NEWS file is updated with relevant information about the changes made in this pull request.

Related Issues

SIP2-309

Learning and Resources (if applicable)

Discuss any research conducted during the development of this pull request. Include links to relevant blog posts, patterns, libraries, or addons that were used to solve the problem.

Screenshots (if applicable)

If this pull request involves any visual changes or new features, consider including screenshots or GIFs to illustrate the changes.

@zakletskyi-epam
zakletskyi-epam requested a review from a team as a code owner June 26, 2026 11:26
@zakletskyi-epam zakletskyi-epam self-assigned this Jun 26, 2026
@zakletskyi-epam zakletskyi-epam changed the title SIP2-309: Fix doPinCheck failing when FOLIO returns 204 No Content without Content-Type header SIP2-309: Fix doPinCheck failing when FOLIO returns 200 without Content-Type header Jun 26, 2026
# Conflicts:
#	NEWS.md
# Conflicts:
#	NEWS.md
#	src/test/java/org/folio/edge/sip2/api/PatronInformationIT.java
@sonarqubecloud

Copy link
Copy Markdown

@zakletskyi-epam
zakletskyi-epam merged commit 71d7d8b into master Jun 30, 2026
16 checks passed
@zakletskyi-epam
zakletskyi-epam deleted the SIP2-309 branch June 30, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants